#-------------------------------------------------
#
# Project created by QtCreator 2024-06-19T15:02:30
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = precisionopView
TEMPLATE = app

win32:CONFIG(release, debug|release): DESTDIR = $$OUT_PWD/../output/release/bin
else:win32:CONFIG(debug, debug|release): DESTDIR = $$OUT_PWD/../output/debug/bin
else:unix: DESTDIR = $$OUT_PWD/../output/bin

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

win32: {
    # Windows 特有的设置
    LIBS += -lws2_32  # Windows Sockets 2.x 库
    # 如果需要，还可以添加其他 Windows 特有的库
}

unix:!macx: {
    # Linux/ARM（非 macOS）特有的设置
    LIBS += -lmodbus  # 假设 Linux/ARM 上需要 modbus 库
    # 还可以添加其他 Linux/ARM 特有的库和设置
}
#LIBS += -lpthread libwsock32 libws2_32
QMAKE_CFLAGS += -std=c99
INCLUDEPATH += /path/to/open62541/include

SOURCES += \
    main.cpp \
    mainwindow.cpp \
    opcuaclient.cpp \
    open62541.c

HEADERS += \
    mainwindow.h \
    opcuaclient.h \
    open62541.h

FORMS += \
    mainwindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
# ##### C++第三方库 ##### #

# ##### libmodbus ##### #
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/3rdparty/libmodbus/lib/ -lmodbus
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/3rdparty/libmodbus/lib/ -lmodbus
else:unix: LIBS += -L/home/runner/work/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/ -lmodbus

INCLUDEPATH += $$PWD/../3rdparty/libmodbus/include
DEPENDPATH += $$PWD/../3rdparty/libmodbus/include
